home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / amos / intuiextend16.lha / bonus / easylife / EasyLife144.doc < prev   
Text File  |  1992-02-26  |  23KB  |  774 lines

  1. Easylife Command Quick Reference
  2. ================================
  3.  
  4. 1. ZONES & MULTI ZONES
  5. ----------------------
  6.  
  7.    X1 = ElZnsx(N)
  8.    Y1 = ElZnsy(N)
  9.    X2 = ElZnex(N)        
  10.    Y2 = ElZney(N)
  11.    
  12. These functions return the co-ordinates of screen zone N on the current
  13. screen, set with "Set Zone N,X1,Y1 To X2,Y2". 
  14.    
  15.    X1 = ElZnsx(S,N)
  16.    Y1 = ElZnsy(S,N)
  17.    X2 = ElZnex(S,N)
  18.    Y2 = ElZney(S,N)
  19.    
  20. These functions return the co-ordinates of screen zone N on screen no S.
  21.  
  22.  
  23.  
  24.    ElZn Shift S,DX,DY   
  25.    ElZn Shift S,DX,DY,FIRST To LAST
  26.    
  27. The first function moves all zones on screen S by DX pixels horizontally,
  28. and DY pixels vertically. The second only affects zones FIRST To LAST.
  29.  
  30. NOTE: This function does not actually scroll the graphics in the zone, It
  31.       just changes the zones co-ordinates quickly, e.g. To keep the zone
  32.       stationary relative to a scrolling background.
  33.       
  34.  
  35.  
  36.  
  37.    ElMz Reserve NUMZONES
  38.    
  39. This command reserves NUMZONES easylife Multi Zones. These are an alternative
  40. to standard AMOS screen zones, and cannot be used at the same time on the
  41. same screen as AMOS screen zones. The main differences are than multi zones
  42. to not just have a number, but a GROUP number, and an ID number, either of
  43. which can be between - and 65535. This command sets the total number of zones
  44. that space is reserved for - they can have any GROUP/ID number - they don't
  45. have to be consecutive.
  46.  
  47. THe main advantags of multi zones are that you can scan for a point being in
  48. only one group of zones, and that if they overlap, you can find all the
  49. zones a point lies in, not just the first. The disadvantages are that they
  50. are slower than AMOS zones, and you must specify the co-ordinates to test -
  51. there is no Mouse Zone equivilent.
  52.  
  53.  
  54.    ElMz Set Zone GROUP,ID,X1,Y1 To X2,Y2
  55.    ElMz Set Zone GROUP,ID
  56.  
  57. The first of these commands sets the co-ordinates of a multi zone. The 
  58. second removes a multizone from the reserved zones.
  59.  
  60.  
  61.   =ElMznsx(GROUP,ID)
  62.   =ElMznsy(GROUP,ID)
  63.   =ElMznex(GROUP,ID)
  64.   =ElMzney(GROUP,ID)
  65.   
  66. These return the co-ordinates of a multi zone.
  67.  
  68.    
  69.   ElMz Erase GROUP
  70.   
  71. This command erases all multi zones in a group.
  72.  
  73.  
  74.    =El MZone(X,Y)
  75.    =El MZone(X,Y,GROUP)
  76.   
  77. The first of these functions returns the first mutli zone containing the
  78. point (X,Y). The second only searches the zones of group G. Both return
  79. the zone ID number, or 0 if no zone is found that contains the point.
  80.  
  81. e.g. MZ=El MZone(X Screen(X Mouse),Y Screen(Y Mouse))
  82.  
  83.  
  84.    =El MZoneN
  85.    
  86. This function returns the ID number of the next zone that contains the
  87. point given in the previous MZone function, or 0 if there are no more zones
  88. that contain the point.
  89.  
  90.    =El MZoneG
  91.  
  92. This function returns the GROUP number of the last zone returned by a
  93. =ElMZone / =ElMZoneN function.
  94.  
  95.  
  96.  
  97.  
  98. Zone Banks
  99. ----------
  100.  
  101. Zone banks are created by the Zone Editor Accessory Program, and like multi
  102. zones, contain zones identifed by GROUP and ID numbers, however in a zone
  103. bank, GROUP numbers must be consecutive, as must ID numbers.
  104.  
  105.    Elzb Add SCREEN,BANK,GROUP
  106.  
  107. This function erases the AMOS screen zones on SCREEN, and replaces them 
  108. with all the zones the group identifer GROUP from the zone bank no. BANK.
  109. They can then be used as if they can be created with Reserve Zone/Set Zone.
  110.  
  111.  
  112.    Elzb Multi Add BANK,GROUP
  113.    
  114. This function adds the group of zones to the multi zones of the current
  115. screen, replacing any existing zones which have the same GROUP & ID as
  116. the zones being installed. You must have already reserved an adequate
  117. number of multi zones.   
  118.  
  119.  
  120.    Elzb Install BANK
  121.    
  122. This command installs all groups from the bank as multi zones on the
  123. current screen, erasing all existing zones & multi zones first.
  124.    
  125.  
  126.  
  127.       
  128.            
  129. 2. CHARACTER SEARCHING - The (E)asy (L)ife (F)ind functions
  130. -----------------------------------------------------------
  131.  
  132.    = Elf Asc(S$,A)
  133.    = Elf Asc(S$,A,P)
  134.    
  135. This function searches for the first occurance of a character with AscII
  136. code A in S$. The second variation starts at position P+1. If the character
  137. is found, the function returns it's position, otherwise it returns 0.
  138.  
  139. NOTE: The second function begins at position P+1, not P, so if position P
  140.       contains the character, it is ignored. This may seem wierd behaviour,
  141.       and is different from AMOS's =Instr, but I find it much more usefull
  142.       because often you want to find each occurance of the character, and
  143.       with this arangement, to find the next, you pass the position of the
  144.       lat in P.
  145.    
  146.       
  147.    = Elf Not Asc(S$,A)
  148.    = Elf Not Asc(S$,A,P)
  149.    
  150. These is the inverse of the last functions, and return the position of the
  151. first character in S$ that doesn't have AscII code A. Usefull for skipping
  152. spaces in unformatted input.
  153.  
  154.  
  155.    = Elf Last Asc(S$,A)
  156.    = Elf Last Asc(S$,A,P)
  157.    
  158. This is similar to =Elf Asc, but searches backwards from the end of the
  159. string. (Or position P-1, if P is given). The result is still the position
  160. of the character from the start of the string.
  161.  
  162.  
  163.    = Elf Last Not Asc(S$,A)
  164.    = Elf Last Not Asc(S$,A,P)
  165.    
  166. This variation searches backwards like =Elf Last Asc, for the first 
  167. occurance of any character other than A.
  168.  
  169.  
  170.    = Elf Nth Asc(S$,A,N)
  171.   
  172. This function returns the position of the Nth occurance of A in S$.  
  173.  
  174.  
  175.   = Elf Num Asc(S$,A)
  176.   
  177. This function returns the number of occurances of A in S$.    
  178.   
  179.  
  180.    = Elf Char(S$,A$)
  181.    = Elf Char(S$,A$,P)
  182.    = Elf Not Char(S$,A$)
  183.    = Elf Not Char(S$,A$,P)
  184.    = Elf Last Char(S$,A$)
  185.    = Elf Last Char(S$,A$,P)
  186.    = Elf Last Not Char(S$,A$)
  187.    = Elf Last Not Char(S$,A$,P)
  188.    = Elf Nth Char(S$,A$,N)
  189.    = Elf Num Char(S$,A$)
  190.   
  191. The =Elf Char functions are identical to their Elf Asc equivilents defined
  192. above, but searcb for any character in A$, instead of the single character
  193. with AscII code A. E.g. =Elf Last Not Char("... --- ..-.-","-.") would
  194. return 8 - the position of the last space.
  195.  
  196.  
  197.    = Elf Control(S$)      
  198.    = Elf Control(S$,P)      
  199.    
  200. This function retrun the position of the first control character (AscII
  201. code <32) in S$.
  202.  
  203.  
  204.    Elf Fail Start
  205.    Elf Fail End
  206.    
  207. After an Elf Fail End command, all these functions return the length of the
  208. string instead of 0, if the character beign searched for is not found (Except
  209. Elf Num & Elf Control commands). Elf Fail Start changes them back to the
  210. default condition of returning 0.
  211.    
  212.  
  213. 3. COMPRESSION
  214. --------------
  215.  
  216. Easylife can load and save Powerpacked data, using powerpacker.library
  217. in standard powerpacker data format, compatabile with powerpackers crunch
  218. as data, ppmore, and anything else that uses powerpacker.library
  219.  
  220.  
  221.    ElPp Keep On
  222.    ElPp Keep Off
  223.    
  224. The first command forces the powerpacker library to remain in memory.
  225. The second cancels the forcing, but does not necessarily remove the library.
  226.    
  227.  
  228.    ElPp Load BUF,FILENAME$,FLASH
  229.  
  230. This command loads the file FILENAME$, decrunching it if it is powerpacked
  231. into easylife Powerpacker buffer No. BUF. FLASH can be:
  232.  
  233.    0 = Flash colour 0 while decrunching
  234.    1 = Flash colour 1
  235.    2 = Flash colour 17 (Mouse Pointer colour 1)
  236.    3 = Wobble Screen (Has no effect on AMOS screens)
  237.    4 = Decrunch invisibly
  238.  
  239. If buffer BUF is already in use, the old data will be overwritten. There
  240. are 8 buffers, numbered 0-7.
  241.  
  242.    
  243.    =Elpp Buf(BUF)
  244.    =Elpp Len(BUF)
  245.  
  246. These functions do for powerpacker buffers what =Start() and =Length()
  247. do for AMOS banks.
  248.  
  249.  
  250.    Elpp Free BUF
  251.    
  252. This command erases buffer BUF if it exists.
  253.  
  254.  
  255.   =Elpp Crunch(FILENAME$,START,LENGTH,EFFICIENCY,SPEEDUP)
  256.   
  257. This function crunches the memory between START and START+LENGTH, and
  258. saves it to the file FILENAME$. EFFICIENCY is the crunch depth:
  259.  
  260.   0 = Fast Crunch   &   Poor compressino
  261.   1 =     / \                 | 
  262.   2 =      |                  |
  263.   3 =      |                 \ /
  264.   4 = Slowest Crunch & Best compression
  265.  
  266. SPEEDUP is the ammount of memory to allocate to speedup crunching. If the
  267. value you select is not availble a smaller value is tried. SPEEDUP does
  268. not affect the size of the crunched file.
  269.  
  270.   0 = Large (Approx 200-230k)
  271.   1 = Medium (Approx 50-60k)
  272.   2 = Small (Approx 10-12k)
  273.   
  274.  
  275.    Elpp Allocate BUFNO,LENGTH
  276.    
  277. This command manually reserves a powerpacker buffer. This is us